# 编译器
CXX = g++

# 编译选项
CXXFLAGS = -std=c++11

# 链接选项（如果使用 JSON 库）
LIBS = -ljsoncpp
LIB_PATH = -L/usr/lib/x86_64-linux-gnu  # 如果 jsoncpp 库在这个目录

# 默认目标
.PHONY: all
all: server client

# 编译 server
server: Main.cpp
	$(CXX) $(CXXFLAGS) $^ -o $@  $(LIBS) 

# 编译 client
client: Client.cc
	$(CXX) $(CXXFLAGS) $^ -o $@  $(LIBS)  


# 	# 编译 server
# server: Main.cpp
# 	$(CXX) $(CXXFLAGS) $^ -o $@  $(LIBS) -DMyself

# # 编译 client
# client: Client.cc
# 	$(CXX) $(CXXFLAGS) $^ -o $@  $(LIBS)  -DMyself

# 清理目标
.PHONY: clean
clean:
	rm -f server client
